package com.snj.lib;

import java.util.Calendar;

import com.snj.wef.R;

import android.content.Context;
import android.graphics.Bitmap;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

public class PreviewItem extends RelativeLayout {
	
	
	String tag = "PreviewItem";
	
	Context context = null;
	View view = null;
	
	ImageView img_previewimg = null;
	TextView txt_pagenum = null;
	
	public PreviewItem(Context context) {
		super(context);
		// TODO Auto-generated constructor stub
		
		Init(context);
	}
	
	public void Init(Context context)
	{
		this.context = context;
		
		LayoutInflater inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
		view = inflater.inflate(R.layout.layout_previewitem, this);
		
		img_previewimg = (ImageView)view.findViewById(R.id.img_previewimg);
		txt_pagenum = (TextView)view.findViewById(R.id.txt_pagenum);
		
	}
	
	public void SetData(Bitmap img, String pagenum)
	{
		img_previewimg.setImageBitmap(img);
		txt_pagenum.setText(pagenum);
	}
}
